package cn.rcth.base.mapper;

import cn.rcth.base.domain.User;
import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    User selectByPrimaryKey(Long id);

    List<User> selectAll();

    int updateByPrimaryKey(User record);

    /**
     * 查询数据库是否存在当前用户
     * @param openId  唯一id
     * @return  用户
     */
    User selectOpenId(String openId);

    /**
     * 判断手机号是否已经被注册
     * @param phone
     * @return
     */
    User ifPhone(String phone);
}